package com.pty.demo.structural.flyweight;

/**
 * @author pengty
 * @date 2020/3/12
 */
public class ShootingRifle implements Rifle {

    private String name;

    public ShootingRifle(String name) {
        this.name = name;
    }

    @Override
    public void shoot(Sight sight) {
        System.out.println("使用射击步枪， 携带" + sight.getSightTimes() + "倍瞄准镜");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
